package com.mfhcd.facepay.global;


import com.mfhcd.facepay.constant.SPConstant;
import com.mfhcd.facepay.utils.SPUtils;

/**
 * 完整URL示例：BASE_URL + {SERVICE} + "/" + API + {API}
 * <p>
 * {SERVICE}例：CUSTOM_SERVICE
 * <p>
 * {API}例：API_LOGIN
 */
public interface ServerUrl {
    // Server Url
    String HOST = "0.0.0.0";
    String TRACE = null;
    String API = "api/";

    //开发地址
    String BASE_URL_DEVELOP = "https://dev-saas.mfe88.com/";
    String PASS_BASE_URL_DEVELOP = "https://dev-paas.mfe88.com/";
    //测试地址
    String BASE_URL_TEST = "https://test-saas.mfe88.com/";
    String PASS_BASE_URL_TEST = "https://test-paas.mfe88.com/";
    //生产地址
    String BASE_URL_PROD = "https://saas.mfe88.com/";
    String PASS_BASE_URL_PROD = "https://paas.mfe88.com/";

    String BASE_URL = baseUrl(AppConfig.IS_BASE_URL);
    String PASS_BASE_URL = passBaseUrl(AppConfig.IS_BASE_URL);

    static String baseUrl(String type) {

        if (AppConfig.DEBUG) {
            if (SPUtils.getString(SPConstant.IS_BASE_URL).equals(SPConstant.IS_DEVELOP)) {
                return BASE_URL_DEVELOP;
            } else if (SPUtils.getString(SPConstant.IS_BASE_URL).equals(SPConstant.IS_TEST)) {
                return BASE_URL_TEST;
            } else if (SPUtils.getString(SPConstant.IS_BASE_URL).equals(SPConstant.IS_PRODUCT)) {
                return BASE_URL_PROD;
            }
        }

        if (type.equals(AppConfig.IS_DEVELOP)) {
            return BASE_URL_DEVELOP;
        } else if (type.equals(AppConfig.IS_TEST)) {
            return BASE_URL_TEST;
        } else if (type.equals(AppConfig.IS_PRODUCT)) {
            return BASE_URL_PROD;
        }
        return BASE_URL_PROD;
    }

    static String passBaseUrl(String type) {

        if (AppConfig.DEBUG) {
            if (SPUtils.getString(SPConstant.IS_BASE_URL).equals(SPConstant.IS_DEVELOP)) {
                return PASS_BASE_URL_DEVELOP;
            } else if (SPUtils.getString(SPConstant.IS_BASE_URL).equals(SPConstant.IS_TEST)) {
                return PASS_BASE_URL_TEST;
            } else if (SPUtils.getString(SPConstant.IS_BASE_URL).equals(SPConstant.IS_PRODUCT)) {
                return PASS_BASE_URL_PROD;
            }
        }

        if (type.equals(AppConfig.IS_DEVELOP)) {
            return PASS_BASE_URL_DEVELOP;
        } else if (type.equals(AppConfig.IS_TEST)) {
            return PASS_BASE_URL_TEST;
        } else if (type.equals(AppConfig.IS_PRODUCT)) {
            return PASS_BASE_URL_PROD;
        }
        return PASS_BASE_URL_PROD;
    }

    //图片地址
    String BASE_IMAGE_URL = BASE_URL + "file-api/file/";
    /**
     * 交易电子小票ULR=交易小票地址前缀+订单编号
     */
    String TRANSACTION_TICKET_URL_PREFIX = PASS_BASE_URL + "pos-order-service/e/";

    /**
     * 共用数据
     */
    String COMMON_SERVICE = "dict-api";
    String API_GET_IMCODE = "GET_RANDOMCODE";
    String API_CHECK_IMCODE = "CHECK_RANDOMCODE";
    String API_SEND_SMSCODE = "SEND_SMS";
    String API_CHECK_SMSCODE = "VERIFY_SMS";

    /**
     * 客户服务
     */
    String CUSTOMER_SERVICE = "customer-api";
    String API_REGISTER = "customer_register";
    String API_LOGIN = "customer_login";
    String API_LOGOUT = "customer_logout";
    String API_SET_LOGIN_PWD = "customer_set_login_password";
    String API_MOD_LOGIN_PWD = "customer_update_login_pwd";
    String API_SET_TRADE_PWD = "customer_set_trade_password";
    String API_MOD_TRADE_PWD = "customer_update_trade_pwd";
    String API_FORGET_LOGIN_PWD = "customer_login_pwd_forgot";
    String API_FORGET_TRADE_PWD = "customer_trade_pwd_forgot";
    String API_VERIFY_PER = "CUSTOMER_001";
    String API_UPDATE_PER = "person_info_update";
    String API_VERIFY_COM = "CUSTOMER_002";
    String API_UPDATE_COM = "company_info_update";
    String API_PER_INFO = "CUSTOMER_007";
    String API_COM_INFO = "CUSTOMER_008";
    String API_ACCOUNT_INFO = "customer_info_search";
    String API_PER_BANKCARD_ADD = "person_bank_card_add";
    String API_PER_BANKCARD_UNBIND = "person_bank_card_delete";
    String API_PER_BANKCARD_DEFAULT = "person_bank_card_update";
    String API_PER_BANKCARD_SEARCH = "person_bank_card_search";
    String API_COM_BANKCARD_ADD = "company_bank_card_add";
    String API_COM_BANKCARD_UNBIND = "company_bank_card_delete";
    String API_COM_BANKCARD_DEFAULT = "company_bank_card_update";
    String API_COM_BANKCARD_SEARCH = "company_bank_card_search";
    String API_MOD_PHONE = "CUSTOMER_004";
    /**
     * 充转提
     */
    String DOPAY_SERVICE = "customer-api";
    String API_PER_RECHARGE_INIT = "customer_person_recharge_bankquick_init";
    String API_PER_RECHARGE_SUBMIT = "customer_person_recharge_bankquick_submit";
    String API_PER_RECHARGE_CONFIRM = "customer_person_recharge_bankquick_confirm";
    String API_COM_RECHARGE_INIT = "customer_company_recharge_b2b_init";
    String API_COM_RECHARGE_SUBMIT = "customer_company_recharge_b2b_submit";
    String API_TRANSFER_INIT = "TRANSFER_07";
    String API_TRANSFER_TO_BANKCARD = "TRANSFER_01";
    String API_TRANSFER_TO_DOPAY = "TRANSFER_02";
    String API_WITHDRAW_INIT = "CUSTOMER_105";
    String API_WITHDRAW_SUBMIT = "CUSTOMER_101";

    //消息中心
    String MESSAGE_CENTER_SERVICE = "message-service";
    //广告分页查询
    String API_AD_PAGE_QUERY = "AD_PAGE_QUERY";
    //广告详情查询
    String API_AD_DETAIL_QUERY = "AD_DETAIL_QUERY";
    //消息分页查询
    String API_MSG_INFO_PAGE_QUERY = "MSG_INFO_PAGE_QUERY";
    //消息详情查询
    String API_MSG_INFO_DETAIL_QUERY = "MSG_INFO_DETAIL_QUERY";
    //公告分页查询
    String API_NOTICE_PAGE_QUERY = "NOTICE_PAGE_QUERY";
    //消息详情查询
    String API_NOTICE_DETAIL_QUERY = "NOTICE_DETAIL_QUERY";
    //地区查询
    String API_AREA_SELECT = "AREA_SELECT";
    //地区搜索
    String API_AREA_SEARCH = "AREA_SEARCH";
    //银行总行查询
    String API_BANK_HEAD_QUERY = "BANK_HEAD_QUERY";
    //地区查询
    String API_BANK_BRANCH_QUERY = "BANK_BRANCH_QUERY";
    //行业大类
    String API_MCC_BUSINESS_CATEGORY_LEVEL = "MCC_BUSINESS_CATEGORY_LEVEL";
    //MCC类别查询
    String API_MCC_SEARCH = "MCC_SEARCH";
    //文件服务
    String FILE_SERVICE = "file-api";
    //TODO
    String API_PREVIEW = "";
    String API_UPLOAD = "UPLOAD";

    //终端服务
    String TERMINAL_SERVICE = "terminal-api";
    //划拨
    String API_AGENT_TERMINAL_QUERY = "TERMINAL_BASE_003";
    String API_AGENT_TERMINAL_TRANSFER = "APP_TRANSFER_001";
    //划出划入机具列表查询
    String API_AGENT_TERMINAL_TRANSFER_LIST = "APP_TRANSFER_002";
    //划出划入机具详情查询
    String API_AGENT_TERMINAL_TRANSFER_DETAIL = "APP_TRANSFER_004";
    //划出划入机具确认收货
    String API_AGENT_TERMINAL_TRANSFER_CONFIRM = "APP_TRANSFER_003";
    //订购信息查询
    String API_TERMINAL_ORDER_PRICE_QUERY = "QUERY_PRICE_SETTING";
    //终端订购-提交订单
    String API_TERMINAL_CREATE_ORDER = "CREATE_ORDER_INFO";
    //终端订购-确认订单
    String API_TERMINAL_CONFIRM_ORDER = "CONFIG_ORDER_INFO";
    //终端订购-付款确认
    String API_TERMINAL_CONFIRM_PAY = "CONFIG_ORDER_INFO";
    //终端订购-订购明细
    String API_TERMINAL_ORDER_LIST = "QUERY_ORDER_INFO";
    //终端订购-发货单查询
    String API_TERMINAL_TRANSFER_LIST = "QUERY_INVOICE";
    //终端订购-确认收货
    String API_TERMINAL_CONFIRM_TRANSFER = "RECEIVING_GOODS";
    //终端库存列表查询
    String API_TERMINAL_STOCK_LIST = "APP_TRANSFER_006";
    //装换撤 根据sn查询终端信息
    String API_DEVICE_INFO_QUERY = "TERMINAL_MACHINE_0002";
    //装机绑定
    String API_DEVICE_BIND = "TERMINAL_INSTALLATION_0001";
    //换机
    String API_DEVICE_EXCHANGE = "TERMINAL_MACHINE_0005";
    //商户绑定机具
    String API_MERCHANT_BIND_LIST = "TERMINAL_BASE_004";
    //终端厂商查询
    String API_FACTORY_QUERY = "FACTORY_QUERY";
    //终端型号查询
    String API_MODEL_QUERY = "MODEL_QUERY";
    //产品线下产品列表查询
    String API_PROD_QUERY = "PROD_QUERY";
    //商户服务
    String MERCHANT_SERVICE = "merchant-api";
    //商户列表查询
    String API_MER0001 = "MER0001";
    //商户入网详情查询
    String API_MER0002 = "MER0002";
    //商户进度列表查询
    String API_WORK0004 = "WORK0004";
    //商户
    String AGENCY_SERVICE = "agency-api";
    //新增机构
    String ADD_ORG_INFO = "addOrgInfo";
    //检查版本更新
    String API_CHECK_UPDATE = "APP_VERSION_LAST";
    //查询合作经理列表
    String API_QUERY_ORG_USER_LIST = "SYS_ORG_USER_INFO";
    //查询服务商基础信息
    String API_QUERY_ORG_INFO = "queryOrgInfo";
    //查询服务商信息列表查询
    String API_QUERY_ORG_INFO_LIST = "queryOrgInfoList";
    String API_QUERY_ORG_INFO_STATUS_LIST = "queryOrgInfoStatusList";
    //查询服务商信息列表查询
    String API_QUERY_ORG_DETIAL_INFO = "queryOrgInfoDetails";
    //查询服务商上级和下级列表信息
    String API_QUERY_ORG_UP_DOWN = "queryOrgInfoUpDownList";
    //扫码交易直连pass
    String TRADE_SCANPAY_SERVICE = "trade-scanpay-service";
    //付款码支付-被扫
    String API_TRADE_SCANPAY_NATIVEPAY = "scanpay-nativepay";
    //付款码支付-主扫
    String API_TRADE_SCANPAY_MICROPAY = "scanpay-micropay";
    //单笔订单查询
    String API_TRADE_SCANPAY_ORDER_QUERY = "scanpay-order-query";
    //查询工单详情
    String API_WORK0002 = "WORK0002";
    //图片上传
    String API_WORK1003 = "WORK1003";
    //商户入网
    String API_MER0004 = "MER0004";
    //APP 意见反馈
    String API_APP_BACK_MSG = "APP_BACK_MSG";
    //账务服务
    String CAPITAL_API_SERVICE = "capital-api";
    //账务明细列表
    String API_ACC_FLOW_SEARCH = "ACC_FLOW_SEARCH";
    //账务流水汇总
    String API_ACC_FLOW_COUNT = "ACC_FLOW_COUNT";
    //根据客户id查询客户开通的产品
    String API_MER0018 = "MER0018";
    //根据客户号id和产品编码查询商户基本信息
    String API_MER0016 = "MER0016";
    //根据客户号id和产品编码查询商户基本信息
    String AGGREGATION_SERVICE = "aggregation-api";
    //根据客户号id和产品编码查询商户基本信息
    String API_PRECUT_BIND_LIST = "get_precut_bind_list";
    //根据小金商户编号查询商户详情
    String API_MER0019 = "MER0019";
    String API_ORDER_SERVICE = "order-api";
    //交易查询
    String API_POS_ORDER_QUERY_PAGE = "posOrderQueryPage";
    //解绑二维码接口
    String API_NUTYING_BIND_PRECUT = "nutying_bind_precut";
    //二维码绑定接口
    String API_BIND_PRECUT = "bind_precut";
    //交易详情
    String API_POS_ORDER_QUERY_DETAIL = "posOrderQueryDetail";
    //根据code码获取聚合码编号
    String API_GET_QRCODE_NO = "get_qrCode_no";
    //根据客户号查询工单列表
    String API_WORK0005 = "WORK0005";
    //地址管理-列表查询
    String API_QUERY_ADDRESS = "QUERY_ADDRESS";
    //地址管理-新增
    String API_ADD_ADDRESS = "ADD_ADDRESS";
    //地址管理-修改
    String API_UPDATE_ADDRESS = "UPDATE_ADDRESS";
    //地址管理-删除
    String API_DELETE_ADDRESS = "DELETE_ADDRESS";
    //结算记录查询
    String API_SETTLE_INFO_SEARCH = "SETTLE_INFO_SEARCH";
    //磁条卡认证
    String API_AUTH_MAGNETIC_CARD = "MAGCARD0001";
    //营销服务
    String MARKETING_SERVICE = "marketing-api";
    //产品营销查询
    String API_MARKETING_POLICY_NAME = "marketing_policy_name";
    //产品营销费率查询
    String API_MARKETING_SERVICE_FEE = "marketing_service_fee";
    //单台终端服务费设置
    String API_MARKETING_SN_SINGLE_SERVICE_FEE = "marketing_sn_single_service_fee";
    //批量终端服务费设置
    String API_MARKETING_SN_BATCH_SERVICE_FEE = "marketing_sn_batch_service_fee";
    //APP-商户结算卡信息查询
    String API_SETTLE_CARD_LIST = "MER0020";
    //APP-根据商户号修改默认结算卡
    String API_SETTLE_CARD_SET_DEFAULT = "MER0102";
    //APP-商户结算卡信息保存
    String API_SETTLE_CARD_BIND = "MER0200";
    //APP-商户结算卡信息删除
    String API_SETTLE_CARD_UNBIND = "MER0300";
    //服务商终端政策服务费新增
    String API_MARKETING_SERVICE_FEE_ADD = "marketing_service_fee_add";
    //新增小宝商户
    String API_JXB_PRODUCT_OPEN = "MER0021";
    //获取已认证磁条卡列表
    String API_AUTH_MAGNETIC_CARD_LIST = "MAGCARD0102";
    //修改小金商户信息
    String API_UPDATE_BUSINESS_INFO = "MER0101";
    //修改小宝商户信息
    String API_UPDATE_MERCHANT_INFO = "MER0103";
    //查询小宝商户信息
    String API_MERCHANT_INFO = "MER0022";
    //服务商设置终端统一服务费、返券金额
    String API_UNITY_MARKETING_SERVICE_FEE = "marketing_service_fee_add";
    //查询账务交易码字典列表
    String API_ACC_TRADE_CODE_SEARCH = "ACC_TRADE_CODE_SEARCH";
    /**
     * 统计分析
     */
    String STATISTICS_SERVICE = "report-api";
    //服务商交易
    String API_AGENT_TRANSACTION_DATA = "APP_ORG_PROD_TRANSF_DATA";
    //服务商收益
    String API_AGENT_PROFIT_DATA = "APP_ORG_PROD_PROFIT_DATA";
    //根据产品统计交易
    String API_APP_PROD_TRANSF_DATA = "APP_PROD_TRANSF_DATA";
    //根据产品统计收益
    String API_APP_PROD_PROFIT_DATA = "APP_PROD_PROFIT_DATA";
    //查询服务商邀请信息
    String API_FIND_ORG_PROMO_CODE = "findOrgPromoCode";
    //更新消息状态
    String API_UPDATE_MSG_INFO_STATUS = "UPDATE_MSG_INFO_STATUS";
    //客户服务
    String USER_SERVICE = "user-api";
    //查询产品今日收益统计数据
    String API_APP_PROD_PROFIT_DAY = "APP_PROD_PROFIT_DAY";
    //根据产品统计终端激活数据
    String API_APP_PROD_ACTIVE_DATA = "APP_PROD_ACTIVE_DATA";
    //根据产品统计商户新增
    String API_APP_PROD_MER_ADD_DATA = "APP_PROD_MER_ADD_DATA";
    //查询服务商终端激活数据
    String API_APP_ORG_PROD_ACTIVE_DATA = "APP_ORG_PROD_ACTIVE_DATA";
    //商户统计交易结算
    String API_APP_MER_PROD_TRANS = "APP_MER_PROD_TRANS";
}